import * as Vue from 'vue'

// base library
import {
  ConfigProvider,
  Layout,
  Input,
  InputNumber,
  Button,
  Switch,
  Radio,
  Checkbox,
  Select,
  Card,
  Form,
  Row,
  Col,
  Modal,
  Table,
  Tabs,
  Badge,
  Popover,
  Dropdown,
  List,
  Avatar,
  Breadcrumb,
  Steps,
  Spin,
  Menu,
  Drawer,
  Tooltip,
  Alert,
  Tag,
  Divider,
  DatePicker,
  TimePicker,
  Upload,
  Progress,
  Skeleton,
  Popconfirm,
  PageHeader,
  Result,
  Statistic,
  Descriptions,
  Space,
  Pagination,
  message,
  notification,
  Tree
} from 'ant-design-vue'
import Viser from 'viser-vue'

// ext library
import VueCropper from 'vue-cropper'
import App from '@/App.vue'
if (window.$vueApp === undefined) {
  window.$vueApp = Vue.createApp(App)
}
window.$vueApp.use(ConfigProvider)
window.$vueApp.use(Layout)
window.$vueApp.use(Input)
window.$vueApp.use(InputNumber)
window.$vueApp.use(Button)
window.$vueApp.use(Switch)
window.$vueApp.use(Radio)
window.$vueApp.use(Checkbox)
window.$vueApp.use(Select)
window.$vueApp.use(Card)
window.$vueApp.use(Form)
window.$vueApp.use(Row)
window.$vueApp.use(Col)
window.$vueApp.use(Modal)
window.$vueApp.use(Table)
window.$vueApp.use(Tabs)
window.$vueApp.use(Badge)
window.$vueApp.use(Popover)
window.$vueApp.use(Dropdown)
window.$vueApp.use(List)
window.$vueApp.use(Avatar)
window.$vueApp.use(Breadcrumb)
window.$vueApp.use(Steps)
window.$vueApp.use(Spin)
window.$vueApp.use(Menu)
window.$vueApp.use(Drawer)
window.$vueApp.use(Tooltip)
window.$vueApp.use(Alert)
window.$vueApp.use(Tag)
window.$vueApp.use(Divider)
window.$vueApp.use(DatePicker)
window.$vueApp.use(TimePicker)
window.$vueApp.use(Upload)
window.$vueApp.use(Progress)
window.$vueApp.use(Skeleton)
window.$vueApp.use(Popconfirm)
window.$vueApp.use(PageHeader)
window.$vueApp.use(Result)
window.$vueApp.use(Statistic)
window.$vueApp.use(Descriptions)
window.$vueApp.use(Space)
window.$vueApp.use(Pagination)
window.$vueApp.use(Tree)

window.$vueApp.config.globalProperties.$confirm = Modal.confirm
window.$vueApp.config.globalProperties.$message = message
window.$vueApp.config.globalProperties.$notification = notification
window.$vueApp.config.globalProperties.$info = Modal.info
window.$vueApp.config.globalProperties.$success = Modal.success
window.$vueApp.config.globalProperties.$error = Modal.error
window.$vueApp.config.globalProperties.$warning = Modal.warning
window.$vueApp.config.globalProperties.$form = Form

window.$vueApp.use(Viser)
window.$vueApp.use(VueCropper)

process.env.NODE_ENV !== 'production' &&
  console.warn('[antd-pro] NOTICE: Antd use lazy-load.')
